<template>
	<view class="boxes" :class="themeName">
		<view class="flex row-between bg box md">
			<view>门店名称</view>
			<input disabled v-model="name" placeholder="请输入门店名称" type="text" />
		</view>
		<!-- <view class="flex row-between bg box md">
			<view>联系人</view>
			<input disabled v-model="contact" placeholder="请输入门店联系人" type="text" />
		</view> -->
		<view class="flex row-between bg box md" @click="onCall">
			<view>联系电话</view>
			<input disabled v-model="mobile" placeholder="请输入联系电话" type="number" />
		</view>
		<view class="flex row-between bg box md">
			<view>定价(分钟单价)</view>
			<input disabled v-model="price" placeholder="请输入每分钟的价格" type="number" />
		</view>
		<!-- <view class="flex row-between bg box md">
			<view>分成比例</view>
			<input disabled v-model="bili" placeholder="请输入比例,如0.1" type="number" />
		</view> -->
		<!-- <view class="flex row-between bg box md">
			<view>省/市/区</view>
			<input name="region" v-model="region" disabled type="text" placeholder="请选择省、市、区"></input>
		</view> -->
		<!-- <u-picker
			v-model="showRegion"
			:confirm-color="themeColor"
			cancel-color="#999"
			mode="region"
			@confirm="regionChange"
		>
		</u-picker> -->
		<!-- <view class="flex row-between bg box md">
			<view>详细地址</view>
			<input disabled v-model="address" disabled placeholder="请输入详细地址" type="text" />
		</view> -->
		<view class="bg box bordernone md bold">
			<view style="color: #008aff">门店下的机器人</view>
			<!-- <image @click="previewImage" class="addimg m-t-30" :src="imgs" mode=""></image> -->
		</view>
		
		<view class="bg box md flex row-between" v-for="(item,index) in lists" :key="index" @click="gpto2(item.id)">
			<view>{{item.title}}</view>
			<view class="md" style="color: #c001ff;">立即下单</view>
		</view>
	</view>
</template>

<script>
	import { baseimgURL } from "@/config/app";
	import {
	    shopInfoDetail,jqrs
	} from '@/api/others';
export default {
	data() {
		return {
			id:'',
			sn:'',
			name:'',//门店名称
			contact:'',//联系人
			mobile:'',//联系电话
			price:'',//单价
			bili:'',//比例
			province:'',
			city:'',
			district:'',
			region: '',         //省市区显示
			address:'',
			longitude:'',
			latitude:'',
			showRegion:false,
			imgs:'../../static/add.png',
			
			lists:[]
		};
	},
	async onLoad(options) {
		this.id = options.id;
		jqrs({shop_id:options.id}).then(res => {
			this.lists = res;
		});
		shopInfoDetail({id:options.id}).then(res => {
			this.name = res.name;
			this.mobile = res.mobile;
			this.price = res.price;
		});
	},
	methods: {
		// 预览
		previewImage: function() {
			let imgs = []
			imgs.push(this.imgs)
			uni.previewImage({
				current: 0, //预览图片的下标
				urls: imgs //预览图片的地址，必须要数组形式，如果不是数组形式就转换成数组形式就可以
			})
		},
		//打电话
		onCall() {
			uni.makePhoneCall({
				phoneNumber: this.mobile.toString()
			})
		},
		// 去操控
		gpto2(id){
			this.$Router.push({
				path: '/others/pages/order_pay/order_pay',
				query: {
					id: id
				}
			})
		},
	}
};
</script>

<style lang="scss" scoped>
page {
	background-color: #fff;
}
.boxes {
	.box {
		padding: 25rpx 35rpx;
		border-bottom: 1px solid #eee;
		
		input {
		    width: 60%;
			font-size: $-font-size-md;
		}
	}
	.bordernone {
		border: none;
		.addimg {
			width: 130rpx;
			height: 130rpx;
		}
	}
}
</style>